package com.yulinlin.admin.core.service.impl;

import com.yulinlin.admin.core.dao.SuperDao;
import com.yulinlin.admin.core.domain.SuperEntity;
import com.yulinlin.admin.core.domain.po.PagePo;
import com.yulinlin.admin.core.domain.vo.PageVo;
import com.yulinlin.admin.core.service.ISuperService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class ServiceImpl<E extends SuperEntity<E>>  implements ISuperService<E> {

    @Autowired
    private SuperDao<E> dao;

    public List<E> findByIdIn(List<Long> ids){
        return dao.findByIdIn(ids);
    }

    public  E findById(String id){
        return dao.findById(id);
    }

    public   int insertOne(E obj){
        return dao.insertOne(obj);
    }

    public   int insertList(List<E> coll){
        return  dao.insertList(coll);
    }

    public int deleteById(String id){

        return dao.deleteById(id);
    }


    public  int deleteByIdIn(List<Long> coll){

        return dao.deleteByIdIn(coll);

    }

    public  int updateOne(E obj){
        return dao.updateOne(obj);
    }

    public int updateList(List<E> list){
        return  dao.updateList(list);
    }

    public List<E> all(){
        return dao.all();
    }


    public PageVo<E> page(PagePo<E> po){
       return null;
    }

}
